<%--
    Document   : addv030
    Created on : Jul 30, 2012, 3:14:19 PM
    Author     : ems
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/report.css"/>
        <link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
    </head>
    <script type="text/javascript" language="javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
            showGlobalReport();
            swapMenu();
        });
               
    </script>    
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){
            
            $j('.keysearch').live('keyup',function(){
                $j('.rich-table-row').hide();
                $j('.rich-table-row').each(function(){
                    html = $j(this).html();
                    // alert( ununicode(html));  || html.indexOf( $j('.keysearch').val()) > -1
                    if(   html.indexOf( $j('.keysearch').val()) > -1    )  {
                        $j(this).show();
                    }else{
                        $j(this).hide();
                    }

                });
            });

        });


    </script>
    <style type="text/css">
        .addbackground{
            background-color: #D1E1F1 !important;
            float: left;
            height: 100%;
            width: 100%;
            margin-top: 7px;
            padding-bottom: 7px;
        }


    </style>
    <f:view>
        <h:panelGroup rendered="#{loginSession.login.showGlobalMessage}">
            <center style="width: 100%">
                <div id="globalReport" class="globalReport">
                    <p style="padding-top: -5px;"><h:outputText value="#{loginSession.login.globalMessage}"/></p>
                </div>
            </center>
        </h:panelGroup>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;overflow: hidden;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <h:inputHidden id="pc300" value="#{c300Controller.PC300}" />
                <h:inputHidden id="fc150" value="#{c300Controller.FC150}" />
                <h:inputHidden id="fn600" value="#{c300Controller.FN600}" />
                <h:inputHidden id="fc500" value="#{c300Controller.FC500}" />
                <h:inputHidden id="CN315" value="#{c300Controller.CN315}" />
                <h:inputHidden id="fis" value="#{c300Controller.fis}"/>
                <div class="popup" style="height:460px; width:760px;background:white;margin-top:13px; margin-right: 12px ">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="#{locale.report_job}"/></div>
                        <div style=" position: fixed; float:left; height:50px;width:50px;left:708px;">
                            <a id="fancybox-close" onclick="reloadProject()"  style="display: block; float:left;"></a>
                        </div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">

                            <div class="div_menu_header">
                                <div class="menu-header" ><a href="workReport.jsp?action=edit&CN315=<h:outputText value="#{c300Controller.CN315}" />&fis=<h:outputText value="#{c300Controller.fis}" />&FN600=<h:outputText value="#{c300Controller.FN600}" />&FC500=<h:outputText value="#{c300Controller.FC500}" />&FC150=<h:outputText value="#{c300Controller.FC150}" />&emp=<h:outputText value="#{c300Controller.emp}" />" style="text-decoration-color: white"><h:outputText value="#{locale.job}"/></a></div>
                                <div class="menu-header" style="background:white; height:30px;color:black"><h:outputText value="#{locale.report}"/></div>
                                <div class="menu-header" >
                                    <h:outputLink value="historyReport.jsp?FN600=#{c300Controller.FN600}&CN315=#{c300Controller.CN315}&fis=#{c300Controller.fis}&emp=#{c300Controller.emp}&FC150=#{c300Controller.FC150}&FC500=#{c300Controller.FC500}&KeepThis=true&amp;TB_iframe=true&amp;height=453&amp;width=741&amp;modal=true" >
                                        <h:outputText value="#{locale.history}"/></span>
                                    </h:outputLink>
                                </div>

                                <div class="menu-header"><a href="documentReport.jsp?FN600=<h:outputText value="#{c300Controller.FN600}" />&CN315=<h:outputText value="#{c300Controller.CN315}" />&fis=<h:outputText value="#{c300Controller.fis}" />&FC500=<h:outputText value="#{c300Controller.FC500}" />&FC150=<h:outputText value="#{c300Controller.FC150}" />"><h:outputText value="#{locale.document}"/></a></div>
                            </div>
                            <div class="form_item_content" style="margin-top:5px;margin-left: -1px;">

                                <div class="fields_input" style="margin-top:35px;">
                                    <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.time}:"/></label>
                                    <h:selectOneMenu id="comboboxn550123" value="#{c300Controller.CN307}"  styleClass="combobox" style="width:182px; font-size:12px; height:20px;">
                                        <f:selectItems value="#{c300Controller.listTime}" />
                                        <a4j:support event="onchange"
                                                     actionListener="#{c300Controller.change}"  reRender="startHoliday"/>
                                    </h:selectOneMenu>
                                    <label style="text-align:left; float: left;; margin-left:81px "><h:outputText value="#{locale.begin}:"/></label>
                                    <rich:calendar popup="true" styleClass="hasDatepicker" id="startHoliday" disabled="true"
                                                   datePattern="dd-MM-yyyy HH:mm" value="#{c300Controller.CD301}">
                                        <f:convertDateTime pattern="dd-MM-yyyy HH:mm"></f:convertDateTime>
                                    </rich:calendar>

                                </div>
                                <div class="fields_input" style="margin-top:5px;">
                                    <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.finish}(%):"/></label>
                                    <rich:inputNumberSlider style="width:240px; float:left;" value="#{c300Controller.CN315}"
                                                            minValue="0"  maxValue="100" showInput="true"
                                                            showBoundaryValues="false"  />

                                    <label style="text-align:left; float: left;; margin-left:23px "><h:outputText value="#{locale.the_end}:"/></label>
                                    <rich:calendar popup="true" styleClass="hasDatepicker" id="EndHoliday" disabled="true"
                                                   datePattern="dd-MM-yyyy HH:mm" value="#{c300Controller.CD302}">
                                        <f:convertDateTime pattern="dd-MM-yyyy HH:mm"></f:convertDateTime>
                                    </rich:calendar>

                                </div>

                                <div class="item_content addbackground" style="display:block">


                                    <div class="fields_input" style="margin-top:5px;">
                                        <label style="text-align:left; margin-left:21px"><h:outputText value="#{locale.description}:"/> </label>
                                        <rich:editor viewMode="visual"
                                                     theme="advanced"
                                                     value="#{c300Controller.CB317}" height="150" width="564">
                                            <jsp:include page="../../common/EditorComponent.jsp"></jsp:include>
                                        </rich:editor>

                                    </div>


                                </div>

                                <div class="alert" style="font-size: 14px;font-weight: normal;text-transform: uppercase; margin-left: 0px;text-align: center;width: 100%"><h:outputText id="message" value="#{c300Controller.messagefrom}"/></div>
                            </div>

                        </div>

                    </div>

                    <div class="popup-footer">

                        <div class="buttonsave buttonReload" onclick="reloadProject()" lang="<h:outputText value="#{c300Controller.emp}&fis=#{c300Controller.fis}"/>" ><span><h:outputText value="#{locale.close}"/></span></div>
                        <a4j:commandButton onclick="showPleaseWait();" oncomplete="hidePleaseWait();" reRender="message"   action="#{c300Controller.save}" value="#{locale.save}" styleClass="buttonsave">

                        </a4j:commandButton>
                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="#{lcoale.please_wait}" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>

                    </div>

                </div>
            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
    function reloadProject(){
        // self.parent.tb_remove();
        emp =  $j('.buttonReload').attr('lang');
        window.parent.location.href="project.jsp?action=loadproject&emp="+emp;
    }
</script>

